<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>vue局部组件</title>
		<script src="../vue.js"></script>
	</head>
	<body>
		<div id="app">
			<test></test>
		</div>
		<template id="c2">
			<div >
				<h2>你好，我是在渣渣灰</h2>
				<p>{{name}},{{age}}</p>
			</div>
		</template>
		<script>
		 var vm=new Vue({
			 el:'#app',
			 components:{
				 'test':{
					 template:'#c2',
					 data:function(){
						 return {
							 name:'老吴',
							 age:25
						 }
					 }
				 }
			 }
		 })
		</script>
	</body>
</html>
